
import { useParams } from 'react-router-dom';

export default function Name(){
    // 获得路由参数
    const params = useParams();
    console.log( params );
    
    return (
      <div>name:{params.name}</div>
    );
}